package com.liuceng.zen.common.utils;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class ZenUtils {
  public static BigDecimal getCtr(Integer clickNum, Integer viewNum) {
    return viewNum == null || 0 == viewNum ? new BigDecimal(0)
        : new BigDecimal(clickNum * 100).divide(new BigDecimal(viewNum), 3, RoundingMode.UP);
  }


  public static BigDecimal getAvgClickCost(BigDecimal cost, Integer clickNum) {
    return null; /// TODO
  }
}
